import request from "@/utils/request"

export async function queryDictionaryList(params: Dictionary.QueryDictionaryListParams) {
  return request<Dictionary.Entity[]>('/app/manager/dic/list', {
    data: params,
  })
}

export async function saveDictionary(params: Partial<Dictionary.Entity>) {
  return request<boolean>('/app/manager/dic/addOrUp', {
    data: params,
  })
}

export async function delDictionary(params: {infoId: number, status: number}) {
  return request<boolean>('/app/manager/dic/del', {
    data: params,
  })
}

export async function queryDictionary(params: {keyName: string}) {
  return request<Dictionary.Entity[]>('/app/manager/dic/keyValues', {
    data: params,
  })
}
